﻿<Window 
        x:Class="SimpleControlLibrary.UI.RegistDB"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="新增数据源" Height="312" Width="385" 
        MaxHeight="312" MaxWidth="385"
        Loaded="WindowLoaded"
        xmlns:loc="clr-namespace:SimpleControlLibrary.Common"
        xmlns:t="clr-namespace:DBAccessLibrary.Model;assembly=DBAccessLibrary" 
    WindowStartupLocation="CenterScreen" KeyDown="DxWindowKeyDown" >
    <Grid>
      
        <Label Content="数  据  源：" Height="28" HorizontalAlignment="Left" Margin="60,32,0,0" Name="label1" VerticalAlignment="Top" />
        <Label Content="用  户  名：" Height="28" HorizontalAlignment="Left" Margin="60,144,0,0" Name="label2" VerticalAlignment="Top" />
        <Label Content="密      码：" Height="28" HorizontalAlignment="Left" Margin="60,177,0,0" Name="label3" VerticalAlignment="Top" />
        <Label Content="数据库名称：" Height="28" HorizontalAlignment="Left" Margin="60,110,0,0" Name="label4" VerticalAlignment="Top" />
        <Label Content="服务器地址：" Height="28" HorizontalAlignment="Left" Margin="60,76,0,0" Name="label5" VerticalAlignment="Top" />

        <TextBox Height="23" HorizontalAlignment="Left" Margin="139,77,0,0" Name="tbIP" VerticalAlignment="Top" Width="167" 
                 Text="{Binding Path=DataSource.Server,Mode=TwoWay}"/>
        <TextBox Height="23" HorizontalAlignment="Left" Margin="139,111,0,0" Name="tbDBName" VerticalAlignment="Top" Width="167" 
                 Text="{Binding Path=DataSource.DataBase,Mode=TwoWay}"/>
        <TextBox Height="23" HorizontalAlignment="Left" Margin="139,145,0,0" Name="tbUserID" VerticalAlignment="Top" Width="167" 
                 Text="{Binding DataSource.UserID}"/>

        <PasswordBox Height="23" HorizontalAlignment="Left" Margin="139,179,0,0" Name="tbPwd" VerticalAlignment="Top" Width="167" 
                     loc:PasswordBoxBindingProperty.IsPasswordBindingEnabled="True"
                     loc:PasswordBoxBindingProperty.BindedPassword="{Binding DataSource.PassWord,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
        <ComboBox Height="23" HorizontalAlignment="Left" Margin="139,32,0,0" Name="cbType" VerticalAlignment="Top" Width="167" 
                  loc:EnumSelectorProperty.Filter="Ole|ODBC"
                  loc:EnumSelectorProperty.EnumType="{x:Type t:DBType}"
                  loc:EnumSelectorProperty.BindingPath="DataSource.ConnectType"
                  Text="{Binding DataSource.ConnectType}" />
        <Button Name="btnSubmit" Margin="92,225,196,24" Content="确定" Height="23" Width="75"  Click="BtnSubmitClick" />

        <Button Name="btnCanel" Margin="214,225,74,24"  Content="取消" Height="23" Width="75" Click="ButtonInfoClick"/>
           
       
    </Grid>
</Window >
